package com.adee.nowcoder.huawei;

import java.util.*;

public class T023_HJ23 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            char[] arr = str.toCharArray();
            Map<Character, Integer> map = new HashMap();
            for(int i = 0; i < arr.length; i++) {
                if(map.containsKey(arr[i])) {
                    map.put(arr[i], map.get(arr[i])+1);
                } else {
                    map.put(arr[i], 1);
                }
            }
            int minCnt = 0;
            for (Map.Entry<Character, Integer> e : map.entrySet()) {
                Integer v = e.getValue();
                if(minCnt == 0) minCnt = v;
                else if(v < minCnt) minCnt = v;
            }
            Set<Character> set = new HashSet<>();
            for (Map.Entry<Character, Integer> e : map.entrySet()) {
                Integer v = e.getValue();
                if(minCnt == v) set.add(e.getKey());
            }
            StringBuilder sb = new StringBuilder();
            for (char c : arr) {
                if(!set.contains(c)) sb.append(c);
            }
            System.out.println(sb.toString());
        }
    }
}
